home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 July
/
Ahoy_Magazine_87-07_1987_Double_L_Side_A.d64
/
Root Power
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
374b
|
15 lines
0 rem << cd43-8 >>
1 rem ==================================
2 rem commodares problem #39-4 :
3 print"[147] [210]oot [208]ower"
4 rem solution by
5 rem jim speers
6 rem ==================================
100 for i=1 to 256 : k=1 : if sqr(i^2)=i then k=3
110 if sqr(i*i)=i then k=k+1
120 on k goto 160,130,140,150
130 print i;"(i*i) only" : goto 160
140 print i;"(i^2) only" : goto 160
150 print i;"both equal"
160 next i